import { createApp } from 'vue'
import '@/styles/index.scss'
import router from '@/router'
import App from './App.vue'
import '@/utils/http/http.ts'
import iconFont from './components/iconFont/iconFont.vue'
import quill from '@/components/quill/quill.vue'
import directives from './directive'
//naive
import naive from '@/plugins/naive-ui'
// md
import VMdPreview from '@kangc/v-md-editor/lib/preview';
import '@kangc/v-md-editor/lib/style/preview.css';
import githubTheme from '@kangc/v-md-editor/lib/theme/github.js';
import '@kangc/v-md-editor/lib/theme/style/github.css';

import hljs from 'highlight.js';

VMdPreview.use(githubTheme, {
    hljs,
});

function init() {
 const app = createApp(App)
 app.use(router).mount('#app')
 app.component('iconFont',iconFont)
 app.component('QuillEditor',quill)
 app.use(VMdPreview);
 app.use(directives);
 app.use(naive);
}

init()